"""
数据源字段表迁移脚本
"""
from sqlalchemy import create_engine
from config import settings
from database import Base
from models.data_source_field import DataSourceField

def create_data_source_fields_table():
    """创建数据源字段表"""
    # 创建数据库引擎
    engine = create_engine(settings.database_url)
    
    # 创建表
    Base.metadata.create_all(bind=engine, tables=[DataSourceField.__table__])
    
    print("✅ 数据源字段表创建成功")

if __name__ == "__main__":
    create_data_source_fields_table()
